<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Tabs test</title>	
		
		<link type="text/css" rel="stylesheet" href="../dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"></link>
		<link type="text/css" rel="stylesheet" href="../src/main.css"></link>
		<link type="text/css" rel="stylesheet" href="../src/logs.css"></link>
		<link type="text/css" rel="stylesheet" href="../src/filters.css"></link>
		<link type="text/css" rel="stylesheet" href="../src/tabs.css"></link>
		
		<script type="text/javascript" src="../src/utils.js"></script>
		<script type="text/javascript" src="../src/main.js"></script>
		
		<script type="text/javascript">
			
			
			function _onload () 
			{
				main();
				
				exemple1 = 
				{					
	 message:{
		 type:"com.package.CustomType",
   atype:"Object",
   value:{
	   subobj :{
		   type:"flash.geom.Point",
	 atype:"Object",
  value:	{
	  x:	{	
		  type:"Number",
	atype:"Number",
 value:20
	  },
   y:	{	
	   type:"Number",
	atype:"Number",
 value:120
   }	
  }
	   },
	string:	{	
		type:"String",
  atype:"String",
  value:"hello world 0xff00ff, couleur non parsé baabaa"
	},
 source:	{	
	 type:"Source",
  atype:"Source",
  value:"as3:package somepackage \n{"+
		  "\n\timport flash.display.Sprite;"+
		  "\n\timport flash.display.IDisplayable;\n"+
		  "\n\t/**"+
		  "\n\t * Un commentaire de test"+
		  "\n\t */"+
		  "\n\tpublic class Test extends Sprite implements IDisplayable "+
		  "\n\t{"+
		  "\n\t\tpublic function Test( param : String = \"\", param2 : Number = 10, ... rest ){}" +
		  "\n\t}\n}"
 },											
 number:	{
	 type:"Number",
  atype:"Number",
  value:50
 },
 boolean:{
	 type:"Boolean",
  atype:"Boolean",
  value:false
 },
 array:	{
	 type:"Array",
  atype:"Array",
  value:[
  {
	  type:"String",
   atype:"String",
   value:"hello world #ff0000"
  },
  {
	  type:"XML",
   atype:"XML",
   value:"<node attribute='attribute content'>\n\tnode content\n</node>"
  }
  ]
 }										 
   }
	 },
			
  details:{
	  time:Date(),
   level:DEBUG,
   file:"logger-test.html",
   clazz:"window",
   func:"onload",
   line:"121"
  }
				};
				
				exemple2 = 
				{			
	 message:{
		 type:"XMLList",
   atype:"XML",
   value:"<node>foo</node>\n<node>foo</node>\n<node>foo</node>"
	 },		
  details:{
	  time:Date(),
   level:INFO
  }
				};
				exemple3 = 
				{			
	 message:{
		 type:"String",
   atype:"String",
   value:"exemple 3"
	 },		
  details:{
	  time:Date(),
   level:WARN
  }
				};
				exemple4 = 
				{			
	 message:{
		 type:"String",
   atype:"String",
   value:"exemple 4"
	 },		
  details:{
	  time:Date(),
   level:ERROR
  }
				};
				exemple5 = 
				{		
	 message:{
		 type:"String",
   atype:"String",
   value:"exemple 5"
	 },		
  details:{
	  time:Date(),
   level:FATAL
  }
				};
				
				var n = -1;
				var l = 16;
				while( ++n < l )
				{
					var id = requestId( "File " + n );
					log( id, exemple1 );
					log( id, exemple2 );
					log( id, exemple3 );
					log( id, exemple4 );
					log( id, exemple5 );
				}
				
				setTabName( id, "Un nom a la con" );
				setFilterLevel( id, WARN );
				setFilterMode( id, ul.Filter.EQUALS );
				
				log(2, exemple2 );
				log(7, exemple2 );
				log(9, exemple2 );
				log(14, exemple2 );
 			}
			
		</script>
			
	</head>
	<body onload="_onload();" onresize="tabs.repaint();">
				
		<div id="popup" class="popup hidden"></div>
					
	<div id="header">			
		<div id="tabs">
			
		</div>
		
		<div id="controls">
				
			<div id="filters">
				
				<div class="filters">
				
					  <input type="button" class="filter DEBUG" onclick="filterController.setFilterLevel( DEBUG );" id="debugButton" title="Debug"
					/><input type="button" class="filter INFO"  onclick="filterController.setFilterLevel( INFO  );"  id="infoButton"  title="Info"
					/><input type="button" class="filter WARN"  onclick="filterController.setFilterLevel( WARN  );"  id="warnButton"  title="Warn"
					/><input type="button" class="filter ERROR" onclick="filterController.setFilterLevel( ERROR );" id="errorButton" title="Error"
					/><input type="button" class="filter FATAL" onclick="filterController.setFilterLevel( FATAL );" id="fatalButton" title="Fatal"
					/>
						
					<a id="filterLabel" class="label" href="#" onclick="filterController.increment();" title="Increment level filter">No Filter</a>
						
					<input type="checkbox" id="modeSwitch" onclick="filterController.setFilterMode( this.checked );"/>
					<label for="modeSwitch">Filter by equality</label>	
				
				</div>			
			</div>
							
			<div id="expand">		
				
				<a type="button" href="#" onclick="clearTab( tabs.tabUnderFocus.getFile().getId() );">Clear</a>,  
				<a href="#" onclick="expandAll();">expand all</a> or <a href="#" onclick="collapseAll();">collapse all</a>
	
				<input type="checkbox" id="exceptDetails" onclick="setExceptDetails(this.checked);"/>
				<label for="exceptDetails">except details</label>
			</div>
		</div>
	</div>	
	
		<div id="tabs-content">
			
		</div>
	</body>
</html>
